<template>
  <div id="app">
    <van-tabbar v-model="active" @change="onTabChange">
      <van-tabbar-item icon="fire-o">资讯</van-tabbar-item>
      <van-tabbar-item icon="passed">学习</van-tabbar-item>
      <van-tabbar-item icon="flag-o">互动</van-tabbar-item>
      <van-tabbar-item icon="edit">申报</van-tabbar-item>
      <van-tabbar-item icon="contact-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script setup>
import { ref } from 'vue';

const active = ref(0);

const onTabChange = (index) => {
  console.log('Tab changed to:', index);
};
</script>

<style scoped>
/* 这里可以添加自定义样式 */
</style>